﻿Imports Microsoft.VisualBasic
Imports System.Data.Common
Imports System.Data.SqlClient

Namespace ExportTableAdapters
    Partial Public Class BudgetDetail_2TableAdapter
        Inherits System.ComponentModel.Component

        Private Shared _DEFAULT As Integer = 3000

        Public Sub SetCommandTimeOut()
            Dim _configTimeout As String = ConfigurationManager.AppSettings("QueryTimeOut")
            Dim _timeout As Integer = IIf(String.IsNullOrEmpty(_configTimeout), _DEFAULT, Val(_configTimeout))

            For Each command As SqlCommand In Me.CommandCollection
                command.CommandTimeout = _timeout
            Next
        End Sub
    End Class
End Namespace

